home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / rmnologin < prev    next >
Encoding:
Text File  |  2006-10-06  |  1000 b   |  49 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          rmnologin
  4. # Required-Start:    $local_fs $remote_fs
  5. # Required-Stop: 
  6. # Should-Start:      kdm xdm gdm $syslog
  7. # Default-Start:     0 1 2 3 4 5 6
  8. # Default-Stop:       
  9. # Short-Description: Remove /etc/nologin at boot
  10. # Description:       This script removes the /etc/nologin file as the
  11. #                    last step in the boot process, if DELAYLOGIN=yes.
  12. #                    If DELAYLOGIN=no, /etc/nologin was not created by
  13. #                    bootmisc earlier in the boot process.
  14. ### END INIT INFO
  15.  
  16. PATH=/sbin:/bin
  17. [ "$DELAYLOGIN" ] || DELAYLOGIN=yes
  18. . /lib/init/vars.sh
  19.  
  20. do_start () {
  21.     #
  22.     # If login delaying is enabled then remove the flag file
  23.     #
  24.     case "$DELAYLOGIN" in
  25.       Y*|y*)
  26.         rm -f /var/lib/initscripts/nologin
  27.         ;;
  28.     esac
  29. }
  30.  
  31. case "$1" in
  32.   start)
  33.     do_start
  34.     ;;
  35.   restart|reload|force-reload)
  36.     echo "Error: argument '$1' not supported" >&2
  37.     exit 3
  38.     ;;
  39.   stop)
  40.     # No-op
  41.     ;;
  42.   *)
  43.     echo "Usage: $0 start|stop" >&2
  44.     exit 3
  45.     ;;
  46. esac
  47.  
  48. :
  49.